<template>
  <table class="table table-bordered table-stripped">
    <!-- 表格标题区域 -->
    <thead>
      
        <slot name="header"></slot>
      
    </thead>
    <!-- 表格主体区域 -->
    <tbody>
      <tr v-for="item in list" :key="item.id">
        <slot name="body" :row="item"></slot>
      </tr> 
    </tbody>
  </table>
</template>

<script>
export default {
  name: 'MyTable',
  props:{
    list:{
      type:Array,
      required:true
    }
  }
}
</script>

